package com.xiaozhi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.models.auth.In;
import lombok.*;

/**
 * <p>
 *
 * </p>
 *
 * @author 烟尘
 * @since 2023-03-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("course")
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 课程id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    /**
     * 编号
     */
    @TableField("course_num")
    private String courseNum;

    /**
     * 名字
     */
    @TableField("course_name")
    private String courseName;

    @TableField("course_id")
    private String courseId;
    @TableField("cover_url")
    private String coverUrl;
    @TableField("grade")
    private Integer grade;
    @TableField("collect_num")
    private Integer collectNum;

    @TableField("teacher_id")
    private Integer teacherId;

    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(exist = false)
    private List<CourseVideo> courseVideoList;

    @TableField(exist = false)
    private Teacher teacher;

    @TableField(exist = false)
    private List<CourseComment> courseCommentList;


}
